Optimal. Leaf size=78 \[ \frac{2 a b \tanh ^{-1}\left (\frac{b-a \tanh \left (\frac{1}{2} (c+d x)\right )}{\sqrt{a^2+b^2}}\right )}{d \left (a^2+b^2\right )^{3/2}}-\frac{\text{sech}(c+d x) (a-b \sinh (c+d x))}{d \left (a^2+b^2\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.112229, antiderivative size = 78, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2, Rules used = {2866, 12, 2660, 618, 204} \[ \frac{2 a b \tanh ^{-1}\left (\frac{b-a \tanh \left (\frac{1}{2} (c+d x)\right )}{\sqrt{a^2+b^2}}\right )}{d \left (a^2+b^2\right )^{3/2}}-\frac{\text{sech}(c+d x) (a-b \sinh (c+d x))}{d \left (a^2+b^2\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2866
Rule 12
Rule 2660
Rule 618
Rule 204
Rubi steps
\begin{align*} \int \frac{\text{sech}(c+d x) \tanh (c+d x)}{a+b \sinh (c+d x)} \, dx &=-\frac{\text{sech}(c+d x) (a-b \sinh (c+d x))}{\left (a^2+b^2\right ) d}-\frac{\int \frac{a b}{a+b \sinh (c+d x)} \, dx}{a^2+b^2}\\ &=-\frac{\text{sech}(c+d x) (a-b \sinh (c+d x))}{\left (a^2+b^2\right ) d}-\frac{(a b) \int \frac{1}{a+b \sinh (c+d x)} \, dx}{a^2+b^2}\\ &=-\frac{\text{sech}(c+d x) (a-b \sinh (c+d x))}{\left (a^2+b^2\right ) d}+\frac{(2 i a b) \operatorname{Subst}\left (\int \frac{1}{a-2 i b x+a x^2} \, dx,x,\tan \left (\frac{1}{2} (i c+i d x)\right )\right )}{\left (a^2+b^2\right ) d}\\ &=-\frac{\text{sech}(c+d x) (a-b \sinh (c+d x))}{\left (a^2+b^2\right ) d}-\frac{(4 i a b) \operatorname{Subst}\left (\int \frac{1}{-4 \left (a^2+b^2\right )-x^2} \, dx,x,-2 i b+2 a \tan \left (\frac{1}{2} (i c+i d x)\right )\right )}{\left (a^2+b^2\right ) d}\\ &=\frac{2 a b \tanh ^{-1}\left (\frac{b-a \tanh \left (\frac{1}{2} (c+d x)\right )}{\sqrt{a^2+b^2}}\right )}{\left (a^2+b^2\right )^{3/2} d}-\frac{\text{sech}(c+d x) (a-b \sinh (c+d x))}{\left (a^2+b^2\right ) d}\\ \end{align*}
Mathematica [A] time = 0.192775, size = 104, normalized size = 1.33 \[ -\frac{b \sqrt{-a^2-b^2} \tanh (c+d x)-a \sqrt{-a^2-b^2} \text{sech}(c+d x)-2 a b \tan ^{-1}\left (\frac{b-a \tanh \left (\frac{1}{2} (c+d x)\right )}{\sqrt{-a^2-b^2}}\right )}{d \left (-a^2-b^2\right )^{3/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.001, size = 100, normalized size = 1.3 \begin{align*}{\frac{1}{d} \left ( -4\,{\frac{ab}{ \left ( 2\,{a}^{2}+2\,{b}^{2} \right ) \sqrt{{a}^{2}+{b}^{2}}}{\it Artanh} \left ( 1/2\,{\frac{2\,a\tanh \left ( 1/2\,dx+c/2 \right ) -2\,b}{\sqrt{{a}^{2}+{b}^{2}}}} \right ) }-2\,{\frac{-\tanh \left ( 1/2\,dx+c/2 \right ) b+a}{ \left ({a}^{2}+{b}^{2} \right ) \left ( \left ( \tanh \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}+1 \right ) }} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.15745, size = 884, normalized size = 11.33 \begin{align*} -\frac{2 \, a^{2} b + 2 \, b^{3} -{\left (a b \cosh \left (d x + c\right )^{2} + 2 \, a b \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + a b \sinh \left (d x + c\right )^{2} + a b\right )} \sqrt{a^{2} + b^{2}} \log \left (\frac{b^{2} \cosh \left (d x + c\right )^{2} + b^{2} \sinh \left (d x + c\right )^{2} + 2 \, a b \cosh \left (d x + c\right ) + 2 \, a^{2} + b^{2} + 2 \,{\left (b^{2} \cosh \left (d x + c\right ) + a b\right )} \sinh \left (d x + c\right ) + 2 \, \sqrt{a^{2} + b^{2}}{\left (b \cosh \left (d x + c\right ) + b \sinh \left (d x + c\right ) + a\right )}}{b \cosh \left (d x + c\right )^{2} + b \sinh \left (d x + c\right )^{2} + 2 \, a \cosh \left (d x + c\right ) + 2 \,{\left (b \cosh \left (d x + c\right ) + a\right )} \sinh \left (d x + c\right ) - b}\right ) + 2 \,{\left (a^{3} + a b^{2}\right )} \cosh \left (d x + c\right ) + 2 \,{\left (a^{3} + a b^{2}\right )} \sinh \left (d x + c\right )}{{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} d \cosh \left (d x + c\right )^{2} + 2 \,{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} d \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) +{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} d \sinh \left (d x + c\right )^{2} +{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\tanh{\left (c + d x \right )} \operatorname{sech}{\left (c + d x \right )}}{a + b \sinh{\left (c + d x \right )}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.27738, size = 158, normalized size = 2.03 \begin{align*} \frac{\frac{a b \log \left (\frac{{\left | -2 \, b e^{\left (d x + 2 \, c\right )} - 2 \, a e^{c} - 2 \, \sqrt{a^{2} + b^{2}} e^{c} \right |}}{{\left | -2 \, b e^{\left (d x + 2 \, c\right )} - 2 \, a e^{c} + 2 \, \sqrt{a^{2} + b^{2}} e^{c} \right |}}\right )}{{\left (a^{2} + b^{2}\right )}^{\frac{3}{2}}} - \frac{2 \,{\left (a e^{\left (d x + c\right )} + b\right )}}{{\left (a^{2} + b^{2}\right )}{\left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}}}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]